package com.dianjing.dianqun.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dianjing.dianqun.common.base.CrudMpper;
import com.dianjing.dianqun.model.Content;

public interface ContentMapper extends CrudMpper<Content> {
	int deleteByPrimaryKey(Integer userId);

	int insert(Content record);

	int insertSelective(Content record);

	Content selectByPrimaryKey(Integer userId);

	int updateByPrimaryKeySelective(Content record);

	int updateByPrimaryKey(Content record);

	List<Content> selectAllContent();

	List<Content> selectContentBySiteId(@Param("siteId")Integer id);

	List<Content> selectContentByType(@Param("userId")Integer userId,@Param("type")Integer type);

	List<Content> siteChannelContent( @Param("channelId")Integer channelId);

	List<Content> selectContentByLike(@Param("userId")Integer userId,@Param("pageNum")Integer pageNum, @Param("offset")Integer offset);

	List<Content> selectContentRecommend(@Param("userId")Integer userId, @Param("offset")Integer offset);

	Integer selectCountByUserId(@Param("userId")Integer userId);

	List<Content> selectContentByUserId(@Param("userId")Integer userId);

	Long selectContentByFollowCount(@Param("userId")Integer userId, @Param("type")Integer type, @Param("lastTime")String lastTime);

	List<Content> selectContentByFollow(@Param("userId")Integer userId, @Param("type")Integer type, @Param("lastTime")String lastTime);

	List<Content> selectContentByKeyowrd(@Param("keyword")String keyword);

	List<Content> selectContentBySiteAndKeyWord(@Param("siteId")Integer siteId, @Param("keyword")String keyword);

}